<?php
	include_once "../classes/thuvienham.php";
	if(!IsAdmin())
		header("Location: index.php");

	require_once('../captcha/recaptcha/recaptcha.php');
	$publickey = "6LdH09cSAAAAAFi027eeD0UGTLFIfi1Yuwltz3FY";

	include_once "../classes/captcha_bs.php";
	if(isset($_POST['Captcha']))
	{
		$tmp = (int)$_POST['Captcha'];
		
		$captcha = new captcha_bs();
		$captcha->SetSuDungCaptcha($tmp);
		$captcha->CapNhat();
	}
	$captcha = new captcha_bs();
	$data_captcha = $captcha->LayDanhSach();
	
	$val = $data_captcha[0]['SuDungCaptcha'];
?>

<div class="QuanLyMenu">
	<div class="Phai">
		<h4 align="center">Quản lý mã xác nhận trong form đăng ký</h4>
		<form action="index.php?actionad=captcha_quanly" method="POST">
			<div class="TuyChonPhanTrang">
				<table class="CDPhanTrang">
					<tr>
						<td>Sử dụng captcha</td>
						<td>
							<input type="radio" name="Captcha" value="0" id="0" <?php echo ($val == 0) ? 'checked="true"' : '""';  ?> />
							<label for="0">Không</label>
							
							<input type="radio" name="Captcha" value="1" id="1" <?php echo ($val == 1) ? 'checked="true"' : '""';  ?> />
							<label for="1">reCatcha</label>
							
							<input type="radio" name="Captcha" value="2" id="2" <?php echo ($val == 2) ? 'checked="true"' : '""';  ?> />
							<label for="2">iCaptcha</label>
						</td>
					</tr>
				</table>
				<table class="CDPhanTrangS">
					<tr>
						<td align="center"><input class="btn_submit" type="submit" value="Cập nhật"/></td>
					</tr>
				</table>
			</div>
		</form>
	</div>
</div>